import React from 'react'
import ReactDOM from 'react-dom'

function ActionLink() {
  function handleClick(e) {
    e.preventDefault();
    console.log('hahaha')
  }
  return (
    <a href="#" onClick={handleClick}>
      点击事件
    </a>
  )
}

ReactDOM.render(
  <h1>hello { ActionLink() }</h1>,
  document.getElementById('root')
)